﻿using System.ComponentModel.DataAnnotations;

namespace OpenSourceCompany0405.Models;


public class ProfileViewModel
{
    public static string[] labelLevels = new[] { "最强王者", "大师1", "大师2", "大师3" ,"大师4", "大师5", "翡翠1", "翡翠2", "翡翠3", "翡翠4", "翡翠5", "黄金1", "黄金2", "黄金3", "黄金4", "黄金5", "白银1", "白银2", "白银3", "白银4", "白银5", "青铜1", "青铜2", "青铜3", "青铜4", "青铜5", "黑铁1", "黑铁2", "黑铁3", "黑铁4", "黑铁5"};
    
    // [Required]
    [EmailAddress]
    [Display(Name = "电子邮箱")]
    public string Email { get; set; }

    // 股权币数量
    [Display(Name = "股权币数量")]
    public int EquityCoin { get; set; }
    
    [Display(Name = "是否初始化段位")]
    public bool HaveInitLevel { get; set; }
    
    [Display(Name = "本月是否有效工作，是否挂机(由匹配打分系统评判)")]
    public bool ThisMonthHaveValue{ get; set; }
    
    // 从0一直往下，每到下一个段位，人数就x1.2
    [Display(Name = "战略家段位")]
    public int StrategyLevel { get; set; }
    public string StrategyLevelDisplay
    {
        get
        {
            if (!HaveInitLevel)
            {
                return "未初始化";
            }
            return labelLevels[StrategyLevel];
        }
    }

    // 从0一直往下，每到下一个段位，人数就x1.2
    [Display(Name = "战术家段位")]
    public int TacticianLevel { get; set; }
    public string TacticianLevelDisplay
    {
        get
        {
            if (!HaveInitLevel)
            {
                return "未初始化";
            }
            return labelLevels[TacticianLevel];
        }
    }
    
    // 从0一直往下，每到下一个段位，人数就x1.2
    [Display(Name = "战士段位")]
    public int WarriorLevel { get; set; }
    public string WarriorLevelDisplay
    {
        get
        {
            if (!HaveInitLevel)
            {
                return "未初始化";
            }
            return labelLevels[WarriorLevel];
        }
    }
    
    [Required(ErrorMessage = "请输入姓名")]
    [StringLength(50, ErrorMessage = "姓名长度不能超过50个字符")]
    [Display(Name = "姓名")]
    public string FullName { get; set; }

    [Display(Name = "性别")]
    public string Gender { get; set; }
}